import requests from './ajax';

// 登录接口
export const reqLogin=(data)=>requests({
  url:'admin/login',
  method:'POST',
  data
})

// 按实验室查询
export const reqSelectStudentByYids = (xid)=>requests({
  url:`/message/studentBySite/${xid}`,
  method:'GET'
})
//all
export const reqALLStudentByYids = ()=>requests({
  url:'/message/student',
  method:'GET'
})
// 添加成员
export const reqAdd = (data)=>requests({
  url:'/message/student',
  method:'POST',
  data
})
//删除
export const reqdelete=(data)=>requests({
  url:'/message/student',
  method:'DELETE',
  data
 
})

// 修改成员
export const reqUpdate=(data)=>requests({
  url:'/message/student',
  method:'PUT',
  data
 
})
// 修改密码
export const reqChangePassword=(data)=>requests({
  url:'/admin/password',
  method:'PUT',
  data:{
    username:data.username,
    password:data.newpassword1,
    oldpassword:data.password
  }
})